<template>
  <div>
    {{priceAll}}
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  },
  props: ['dataAll'],
  created () {

  },
  computed: {
    priceAll () {
      return this.dataAll.reduce((sum, item) => {
        if (item.checked) {
          sum += item.num * item.price
        }
        return sum
      }, 0)
    }
  },
  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
